

import React from 'react';
import {Row,Col} from 'antd';
import {connect} from 'react-redux';
import './topHeader.less';
class TopHeader extends React.Component{
    constructor(props){
        super(props);
        this.state={
            userName:'张一捷'
        }
    };
    render(){
        let {menuTitle}=this.props;
        return (
            <div className="header_component">
				<Row className="header-top">
					<Col span={24}>
						<span>欢迎,{this.state.userName}</span>
						<a href="">退出</a>
					</Col>
				</Row>
                <Row className="breadcrumb">
                    <Col span={24}>菜单名称--{menuTitle}</Col>
                </Row>                
            </div>    
        )
    }
}

let  mapStateToProps=(state,myownProps)=>{
    return {
        menuTitle:state.memuTitleReducer.menuTitle
    }
}

let mapDispatchToProps=(dispatch,myownProps)=>{
    return {

    }
}

export default connect(mapStateToProps,mapDispatchToProps)(TopHeader)




